package com.opensky.qatest.ui.component;

import org.openqa.selenium.By;

import com.opensky.qatest.ui.component.common.AbstractJoinModal;
import com.opensky.qatest.util.selenium.WebDriverWrapper;

/*
 * Join modal on Curator's profile page
 *
 * @author: Aliakse_Khursevich (hursevich@gmail.com)
 * @version: 1.1
 * 
 */
public class CuratorsProfilePageJoinModal extends AbstractJoinModal implements IComponent {

    private static final String CURATORS_PROFILE_JOIN_MODAL = "//div[@id='ui-tooltip-modal']";

    public CuratorsProfilePageJoinModal(WebDriverWrapper driver) {
	super(driver);
    }

    @Override
    public boolean isComponentLoaded() {
	driver.pause(5);
	return driver.waitAndVerifyElementPresent("CURATORS_PROFILE_JOIN_MODAL", By.xpath(CURATORS_PROFILE_JOIN_MODAL));
    }

    // ************************ GET/SET methods **************************

    @Override
    public String getName() {
	return "Curator's profile page join modal";
    }
}
